package com.objection.inherit;

public class Manager extends Employee{
    private float bonus;
    public Manager(Person person, float salary, float bonus) {
        super(new Person(person.name, person.age, person.sex), salary);
        this.bonus = bonus;
    }

    @Override
    public float getSalary() {
        return this.bonus + super.getSalary();
    }
    public void getPersonInformationByStr() {
        var person = this.getPersonalInformation();
        System.out.println("name: " + person.name + " age: " + person.age + " sex: " + person.sex + " salary: " + this.getSalary());
    }
}